package com.syyo.gulimall.order.feign;

import com.syyo.common.domain.ResultVo;
import com.syyo.common.vo.SkuHasStockVo;
import com.syyo.gulimall.order.domain.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: wang
 * @date: 2021/3/2 16:02
 * @Description:
 */
@FeignClient("gulimall-ware")
public interface WareFeign {

    @GetMapping("/ware/waresku/hasStock")
    List<SkuHasStockVo> findSkuHasStock(@RequestParam("skuIds") List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare")
    ResultVo getFare(@RequestParam("addrId") Long addrId);

    @PostMapping("/ware/waresku/lock/order")
    ResultVo orderLockStock(@RequestBody WareSkuLockVo vo);
}
